Skip to content

Potential fix for code scanning alert no. 6: Clear-text logging of sensitive information#5

Merged
johnteee merged 1 commit into
mainfrom
alert-autofix-6
May 14, 2026
Merged

Potential fix for code scanning alert no. 6: Clear-text logging of sensitive information#5
johnteee merged 1 commit into
mainfrom
alert-autofix-6

Conversation

@johnteee
Copy link
Copy Markdown
Member

Potential fix for https://github.com/TeaEntityLab/teaAgent/security/code-scanning/6

General fix: never include raw credential-bearing input in log/error text. Log a generic validation failure, optionally with non-sensitive metadata (like argument name and expected format), but not the provided value.

Best targeted fix here: in teaagent/cli/_handlers/_mcp.py, replace the stderr print at line 47 to remove {spec} entirely. Keep functionality unchanged (still rejects malformed input and returns 1), while preventing accidental secret disclosure. No new methods/imports/dependencies are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…nsitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@johnteee johnteee marked this pull request as ready for review May 14, 2026 10:45
@johnteee johnteee merged commit e6a74e4 into main May 14, 2026
13 of 17 checks passed
@johnteee johnteee deleted the alert-autofix-6 branch May 14, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant